package org.batatasframework.web.element;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

public class HtmlStyle {
	private final Map<String, Object> styles = new HashMap<>();
	
	public void append(String name, Object value){
		styles.put(name, value);
	}
	
	@Override
	public String toString() {
		StringBuilder style = new StringBuilder();
		for(Entry<String, Object> entry : styles.entrySet()){
			style.append(entry.getKey()).append(':').append(entry.getValue()).append(';');
		}
		return style.toString();
	}
}
